<?php
/**
* @version		$Id: toolbar.php 15180 2010-03-04 22:58:32Z ian $
* @package		Joomla
* @copyright	Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.
* @license		GNU/GPL, see LICENSE.php
* Joomla! is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/

// no direct access
 defined('_JEXEC') or die('Restricted access');
 jimport('joomla.html.toolbar');
 
 class TaxiBookingHelperToolbar extends JObject
 {	
 	function getToolbar() 
        {
 		$bar =& new JToolBar( 'My Toolbar' );
 		$bar->appendButton( 'Standard', 'new', 'New Record', 'new', false );
 		$bar->appendButton( 'Separator' );
 		$bar->appendButton( 'Standard', 'delete', 'Delete Record', 'delete', false );
 
 
 		return $bar->render();
 	}
        
        function preferences($component, $height='150', $width='570', $alt = 'Preferences', $path = '')
	{
		$user =& JFactory::getUser();
		if (($user->get('gid') != 24) && ($user->get('gid') != 25)) {
			return;
		}

		$component	= urlencode( $component );
		$path		= urlencode( $path );
		$bar =& new JToolBar( 'My Toolbar' );
		// Add a configuration button
		$bar->appendButton( 'Popup', 'config', $alt, 'index.php?option=com_taxibooking&amp;task=showParams&amp;component='.$component.'&amp;path='.$path, $width, $height );
                
                return $bar->render();
	}
 }
?>